package br.com.fabrica.aid.aid_fabrica.business;

import br.com.fabrica.aid.aid_fabrica.domain.Coordenador;
import br.com.fabrica.aid.aid_fabrica.persistence.CoordenadorDAO;
import br.gov.frameworkdemoiselle.lifecycle.Startup;
import br.gov.frameworkdemoiselle.stereotype.BusinessController;
import br.gov.frameworkdemoiselle.template.DelegateCrud;
import br.gov.frameworkdemoiselle.transaction.Transactional;

@BusinessController
public class CoordenadorBC extends DelegateCrud<Coordenador, Long, CoordenadorDAO> {
	
	private static final long serialVersionUID = 1L;
	
	@Startup
	@Transactional
	public void load() {
		if (findAll().isEmpty()) {
			insert(new Coordenador("Lisieux", "1234", "lisieux@email.com", "2222-2222",true));
		}
	}

}
